#include <iostream>
#include <exception>
using namespace std;
void throwInt()
{
    throw 1;
}

void throwDouble()
{
    throw 0.1;
}
void throwString()
{
    throw "err";
}

int main()
{
    try
    {
        // throwInt();
        // throwDouble();
        throwString();
    }
    catch(int i)
    {
        cerr << i << endl;
    }
    catch(double d)
    {
        cerr << d << endl;
    }
    catch(...) {
        cerr << "error" << endl;
    }

    return 0;
}